<div class="container">
    <h1>添加活动</h1>{{.error}}
    <form method="post" action='{{urlfor "ActivityController.AddActivity"}}' enctype="multipart/form-data" >
        <div class="form-group">
            <label>活动名称：</label>
            <input type="text" class="form-control" name="ActivityName">
        </div>
        <div class="form-group">
            <label>活动商品：</label>
            <select name="ProductId" id="">
                <option value="">--请选择--</option>
                {{range .product}}
                <option value="{{.ProductId}}">{{.ProductName}}</option>
                {{end}}
            </select>
        </div>
        <div class="form-group">
            <label>开始时间：</label>
            <input type="text" class="form-control" name="StartTime">格式：Y-m-d H:i:s
        </div>
        <div class="form-group">
            <label>结束时间：</label>
            <input type="text" class="form-control" name="EndTime">格式：Y-m-d H:i:s
        </div>
        <div class="form-group">
            <label>活动商品总数：</label>
            <input type="text" class="form-control" name="Total">
        </div>
        <div class="form-group">
            <label>活动状态：</label>
            <input type="radio" name="Status" checked value="1">未开始
            <input type="radio" name="Status"  value="2">进行中
        </div>
        <div class="form-group">
            <label>每秒可售商品个数：</label>
            <input type="text" class="form-control" name="SecondLimit">
        </div>
        <div class="form-group">
            <label>每人限购商品数：</label>
            <input type="text" class="form-control" name="EveryoneLimit">
        </div>
        <div class="form-group">
            <label>购买概率：</label>
            <input type="text" class="form-control" name="BuyRate">%
        </div>
        <button type="submit" class="btn btn-default">添加</button>
    </form>
    <a href='{{urlfor "ActivityController.Index"}}'>返回</a>
</div>